SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 50480: A "Key not found" error occurs when using ODS LAYOUT and specifying different styles between graphics procedures

DetailsAboutRate It
The following error is generated when you attempt to change ODS styles between two SAS/GRAPH or Statistical Graphics (SG) procedures in order to display them differently in a PDF file using ODS LAYOUT:
ERROR: Key not found.
ERROR: Fatal ODS error has occurred. Unable to continue processing this output destination.

A PDF file is produced, but no images are written to the file.

You must remove the ODS LAYOUT statements or remove the style change between the two procedures in order to prevent the error.

The sample code below reproduces the error.

data planets;
    input planet $ distance;
    datalines;
Mercury 43.4
Venus 68
Earth 94.5
Mars 155
;
run;
quit;

ods pdf style=styles.sasweb file="test.pdf";

ods layout start rows=2;

proc gchart data=planets;
   vbar3d planet / sumvar=distance
                   subgroup=planet
                   raxis=axis1                
                   nolegend
                   sum
   ;
  axis1 label=("Millions of Miles");
run;

ods pdf style=styles.journal;

proc gchart data=planets;
   vbar3d planet / sumvar=distance
                   subgroup=planet
                   raxis=axis1             
                   nolegend
                   sum
   ;
run;
quit;

ods layout end;
ods _all_ close;
ods preferences;


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.3 TS1M29.4 TS1M1
Z649.3 TS1M29.4 TS1M1
Microsoft® Windows® for x649.3 TS1M29.4 TS1M1
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3 TS1M2
Microsoft Windows Server 2003 for x649.3 TS1M2
Microsoft Windows Server 20089.3 TS1M2
Microsoft Windows Server 2008 R2 for x649.3 TS1M29.4 TS1M1
Microsoft Windows Server 2008 for x649.3 TS1M29.4 TS1M1
Microsoft Windows XP Professional9.3 TS1M2
Windows 7 Enterprise 32 bit9.3 TS1M2
Windows 7 Enterprise x649.3 TS1M29.4 TS1M1
Windows 7 Home Premium 32 bit9.3 TS1M2
Windows 7 Home Premium x649.3 TS1M2
Windows 7 Professional 32 bit9.3 TS1M2
Windows 7 Professional x649.3 TS1M29.4 TS1M1
Windows 7 Ultimate 32 bit9.3 TS1M2
Windows 7 Ultimate x649.3 TS1M2
Windows Vista9.3 TS1M2
Windows Vista for x649.3 TS1M2
64-bit Enabled AIX9.3 TS1M29.4 TS1M1
64-bit Enabled HP-UX9.3 TS1M29.4 TS1M1
64-bit Enabled Solaris9.3 TS1M29.4 TS1M1
HP-UX IPF9.3 TS1M29.4 TS1M1
Linux9.3 TS1M29.4 TS1M1
Linux for x649.3 TS1M29.4 TS1M1
Solaris for x649.3 TS1M29.4 TS1M1
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.